package com.uwlaser.modules.system.service;

import com.uwlaser.base.PageInfo;
import com.uwlaser.base.CommonService;
import com.uwlaser.modules.system.domain.SysExternalHttpLog;
import com.uwlaser.modules.system.service.dto.SysExternalHttpLogDto;
import com.uwlaser.modules.system.service.dto.SysExternalHttpLogQueryParam;
import org.springframework.data.domain.Pageable;
import java.util.List;
import java.util.Set;

/**
* @author QZK
* @date 2022-12-07
*/
public interface SysExternalHttpLogService extends CommonService<SysExternalHttpLog>  {

    static final String CACHE_KEY = "sysExternalHttpLog";

    /**
    * 查询数据分页
    * @param query 条件
    * @param pageable 分页参数
    * @return PageInfo<SysExternalHttpLogDto>
    */
    PageInfo<SysExternalHttpLogDto> queryAll(SysExternalHttpLogQueryParam query, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param query 条件参数
    * @return List<SysExternalHttpLogDto>
    */
    List<SysExternalHttpLogDto> queryAll(SysExternalHttpLogQueryParam query);

    SysExternalHttpLog getById(Integer id);
    SysExternalHttpLogDto findById(Integer id);

    /**
     * 插入一条新数据。
     */
    int insert(SysExternalHttpLogDto resources);
    int updateById(SysExternalHttpLogDto resources);
    int removeById(Integer id);
    int removeByIds(Set<Integer> ids);

    int addLog(SysExternalHttpLog log);

    /**
     * http请求单条重传
     * @param resources
     * @return
     */
    int reuploadOne(SysExternalHttpLog resources) throws Exception;
    /**
     * http请求一键重传
     * @return
     */
    int reuploadAll();

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    // void download(List<SysExternalHttpLogDto> all, HttpServletResponse response) throws IOException;
}
